//
//  LSGetZSDManager.m
//  听说弱点强化训练
//
//  Created by 盛超 on 2018/9/5.
//  Copyright © 2018年 盛超. All rights reserved.
//

#import "LSGetZSDManager.h"

@implementation LSGetZSDManager

- (void)requestWithCompltionSuccess:(void (^)(NSArray *))success failuer:(void (^)(NSString *))failure {
    self.requestUrl = @"api/ZXYYTS/W_ZXYYTS_KnowledgePointRecognitionByPost";
    
    [self requestPostMethodWithSuccess:^(id responseObject) {
        
        NSArray *array = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableContainers error:nil];

        NSMutableArray *mutlArr = [NSMutableArray array];
        for (NSDictionary *dict in array) {
            LSModelZSD *zsd = [LSModelZSD yy_modelWithDictionary:dict];
            [mutlArr addObject:zsd];
        }
        success(mutlArr);
        
    } Failure:^(NSError *error) {
        failure(error.localizedDescription);
    }];
}

@end
